package application.models;

import application.models.Observer;

/**
 * An object is observable when it allows observers to observe it.
 * An object needs this interface in order for observers to register.
 * 
 * @author Morten Therkildsen & Philip Rasmussen
 */
public interface Observable {

	/**
	 * Registers an observer for the object
	 * An observer may only be added once - subsequent adds of the same observer are ignored
	 * 
	 * @param observer		The observer to add
	 */
	public void addObserver(Observer observer);
	
	/**
	 * Removes a previously set observer from the observable object
	 * Nothing will happen if observer has not been added beforehand
	 * 
	 * @param observer		A previously added observer
	 */
	public void removeObserver(Observer observer);
}
